Skip to content

feat(cli): add users set-status command for NIP-38 profile status - #3253

Merged
wpfleger96 merged 2 commits into
block:mainfrom
kaganin:users-set-status
Jul 28, 2026
Merged

feat(cli): add users set-status command for NIP-38 profile status#3253
wpfleger96 merged 2 commits into
block:mainfrom
kaganin:users-set-status

Conversation

@kaganin

@kaganin kaganin commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

The desktop client renders a persistent user status (NIP-38 kind:30315, d:general) as the status line on profiles, but the CLI had no way to set it — only ephemeral presence (set-presence, kind:20001). Integrations that want a scriptable, durable status line (for example a now-playing music bridge that shows the current TIDAL track on a profile) had no entry point.

Screenshots

1 2

This adds:

buzz users set-status --text "Working on the relay" --emoji "🔧"
buzz users set-status --text "" --emoji "🎶"   # intentional emoji-only status
buzz users set-status --clear                  # removes the status
  • Signs and submits the replaceable kind:30315 event via the HTTP bridge (no WS needed — unlike presence, user status is a stored event).
  • Uses the d:general coordinate the desktop client already reads for the profile status line, and the same emoji tag shape SetStatusDialog publishes.
  • Event construction lives in buzz_sdk::build_user_status(), keyed off buzz_core::kind::KIND_USER_STATUS, so the CLI command is a thin sign/submit wrapper. Text and emoji are trimmed; a blank emoji is omitted rather than emitted as an empty tag.
  • Clearing is the explicit --clear flag, mutually exclusive with --text/--emoji. It publishes an empty-content event carrying only d:general, which the desktop treats as no status. --text "" with an --emoji is an emoji-only status, not a clear.

The desktop client renders a persistent user status (kind:30315,
d:general) on profiles, but the CLI had no way to set it — only
ephemeral presence. Integrations such as a now-playing music bridge
need a scriptable way to update the status line.

`buzz users set-status --text "..." [--emoji "🎶"]` signs and submits
the replaceable status event via the HTTP bridge. Empty text clears
the status.

Signed-off-by: Kagan Yaldizkaya <[email protected]>
@kaganin
kaganin requested a review from a team as a code owner July 28, 2026 01:06
The command built its kind:30315 event inline with a raw EventBuilder and a
duplicated 30315 literal, bypassing buzz-sdk as the typed write boundary and
leaving the event shape untested. build_user_status() now owns the d:general
coordinate, trimming, and emoji omission, keyed off buzz-core's
KIND_USER_STATUS.

An empty --text no longer implies clearing: it left an emoji-only status
whenever --emoji was supplied, which contradicted the help text. Clearing is
now the explicit --clear flag, mutually exclusive with --text/--emoji, and
--text "" --emoji "..." is an intentional emoji-only status.

Signed-off-by: Will Pfleger <[email protected]>
@wpfleger96 wpfleger96 changed the title Add buzz users set-status for the NIP-38 profile status line feat(cli): add users set-status command for NIP-38 profile status Jul 28, 2026
@wpfleger96
wpfleger96 merged commit 60158fc into block:main Jul 28, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants